﻿using CDMS.DAL;
using CDMS.Entities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace CDMS.BLL
{
    public class Contract_BLL
    {
        Contract_DAL db;
        public Contract_BLL()
        {
            db = new Contract_DAL();
        }

        public DataTable GetALL()
        {
            return db.GetALL();
        }

        public DataTable GetALLActivated()
        {
            return db.GetALLActivated();
        }

        public DataTable Search(int Customer_ID, DateTime fromSignDate, DateTime toSignDate, int ContractTypeID, int ContractStatusID)
        {
            return db.Search(Customer_ID, fromSignDate, toSignDate, ContractTypeID, ContractStatusID);
        }

        public Contract GetOne(int Contract_ID)
        {
            return db.GetOne(Contract_ID);
        }

        public int Insert(Contract entity)
        {
         
            return db.Insert(entity);
        }
        public bool Update(Contract entity)
        {

            return db.Update(entity);
        }

        public bool Exists(Contract entity)
        {
            return db.Exists(entity);
        }

        public bool Delete(int Contract_ID)
        {
            return db.Delete(Contract_ID);
        }
    }
}
